import './PersonalSectionContainer.scss'

import React from 'react'
// import PersonalProgress from './PersonalAbstractSection/PersonalProgress/PersonalProgress.jsx';
// import PersonalSystemNotification from './PersonalAbstractSection/PersonalSystemNotification/PersonalSystemNotification.jsx';
// import PersonalHomework from './PersonalAbstractSection/PersonalHomework/PersonalHomework.jsx';
// import PersonalMessage from './PersonalAbstractSection/PersonalMessage/PersonalMessage.jsx';

import PersonalHome from "./PersonalAbstractSection/PersonalHome/PersonalHome.jsx"
import PersonalCourses from './PersonalAbstractSection/PersonalCourses/PersonalCourses.jsx'
import PersonalComments from "./PersonalAbstractSection/PersonalComments/PersonalComments.jsx"
import PersonalNotes from './PersonalAbstractSection/PersonalNotes/PersonalNotes.jsx'
import PersonalCollection from './PersonalAbstractSection/PersonalCollection/PersonalCollection.jsx'
import PersonalSetting from "./PersonalAbstractSection/PersonalSetting/PersonalSetting.jsx"

class PersonalSectionContainer extends React.Component {
    constructor(props) {
        super(props)
    }

    // 不使用自动生成
    render() {
        return (<div className="mooc-section-container">
            <PersonalHome name="动态" hidden={this.props.chosen !== 0}/>
            <PersonalCourses name="最近学习"
                             hidden={this.props.chosen !== 1}
                             histories={this.props.histories}
                             totalPage={this.props.totalPage}
                             page={this.props.page}
                             changePage={this.props.changePage}
                             delHistory={this.props.delHistory}
                             unCollectCourse={this.props.unCollectCourse}
                             collectCourse={this.props.collectCourse}
            />
            <PersonalComments name="我的评论"
                              hidden={this.props.chosen !== 2}
                              comments={this.props.comments}
            />
            <PersonalNotes name="我的笔记"
                           hidden={this.props.chosen !== 3}
                           notes={this.props.notes}
            />
            <PersonalCollection name="收藏夹"
                                hidden={this.props.chosen !== 4}
                                collectedCourses={this.props.collectedCourses}
                                unCollectCourse={this.props.unCollectCourse}
            />
            <PersonalSetting name="个人设置"
                             hidden={this.props.chosen !== 5}
                             username={this.props.username}
                             sign={this.props.sign}
            />
        </div>)
    }
}

PersonalSectionContainer.PropTypes = {
    chosen: React.PropTypes.number
};

PersonalSectionContainer.defaultProps = {
    // chosen: 0
};

PersonalSectionContainer.displayName = 'PersonalSectionContainer';

export default PersonalSectionContainer;